import request from '@/utils/request'

export function listCategory(query) {
  return request({ url: '/cms/category/list', method: 'get', params: query })
}

export function getCategory(id) {
  return request({ url: `/cms/category/${id}` , method: 'get'})
}

export function addCategory(data) {
  return request({ url: '/cms/category', method: 'post', data })
}

export function updateCategory(data) {
  return request({ url: '/cms/category', method: 'put', data })
}

export function delCategory(ids) {
  return request({ url: `/cms/category/${ids}`, method: 'delete' })
}


